﻿namespace OOP1
{
    public class VolvoC30
    {
        public string CarOwner;
        public string PaintColor;
        public int MilesPerGallon = 30;

        public VolvoC30()
        {
        }

        public VolvoC30(string carOwner, string paintColor, int milesPerGallon)
        {
            CarOwner = carOwner;
            PaintColor = paintColor;
            MilesPerGallon = milesPerGallon;
        }

        public void PrintCarDtails()
        {
            System.Console.WriteLine("-----Car Details-----");
            System.Console.WriteLine("Car Owner:{0}", CarOwner);
            System.Console.WriteLine("Car Color:{0}", PaintColor);
            System.Console.WriteLine("Gas Mileage:{0} mpg", MilesPerGallon);
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            VolvoC30 car = new VolvoC30();
            car.CarOwner = "wzy";
            car.PaintColor = "green";
            car.MilesPerGallon = 30;
            car.PrintCarDtails();

            VolvoC30 car1 = car;
            car1.PaintColor = "red";

            VolvoC30 car2 = new VolvoC30("fyf", "Red", 28);
            car2.PrintCarDtails();
            
            Console.WriteLine();
            Console.WriteLine("press key to finish");

            Console.ReadKey();
        }
    }
}